{extend name="top/index" /}
{block name="main"}
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<style>
	li{
		list-style: none;
	}
</style>
<div class="page-content-wrapper">
	<div class="page-content" style="min-height: 874px !important;">
		<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
		<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
						<h4 class="modal-title">Modal title</h4>
					</div>
					<div class="modal-body">
						Widget settings form goes here
					</div>
					<div class="modal-footer">
						<button type="button" class="btn blue">Save changes</button>
						<button type="button" class="btn default" data-dismiss="modal">Close</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>
		<!-- /.modal -->
		<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
		<!-- BEGIN STYLE CUSTOMIZER -->
		<div class="theme-panel hidden-xs hidden-sm">
			<!-- <div class="toggler">
            </div> -->
			<div class="toggler-close">
			</div>
			<div class="theme-options">
				<div class="theme-option theme-colors clearfix">
						<span>
							 THEME COLOR
						</span>
					<ul>
						<li class="color-black current color-default" data-style="default">
						</li>
						<li class="color-blue" data-style="blue">
						</li>
						<li class="color-brown" data-style="brown">
						</li>
						<li class="color-purple" data-style="purple">
						</li>
						<li class="color-grey" data-style="grey">
						</li>
						<li class="color-white color-light" data-style="light">
						</li>
					</ul>
				</div>
				<div class="theme-option">
						<span>
							 Layout
						</span>
					<select class="layout-option form-control input-small">
						<option value="fluid" selected="selected">Fluid</option>
						<option value="boxed">Boxed</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Header
						</span>
					<select class="header-option form-control input-small">
						<option value="fixed" selected="selected">Fixed</option>
						<option value="default">Default</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Sidebar
						</span>
					<select class="sidebar-option form-control input-small">
						<option value="fixed">Fixed</option>
						<option value="default" selected="selected">Default</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Sidebar Position
						</span>
					<select class="sidebar-pos-option form-control input-small">
						<option value="left" selected="selected">Left</option>
						<option value="right">Right</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Footer
						</span>
					<select class="footer-option form-control input-small">
						<option value="fixed">Fixed</option>
						<option value="default" selected="selected">Default</option>
					</select>
				</div>
			</div>
		</div>
		<!-- END STYLE CUSTOMIZER -->
		<!-- BEGIN PAGE HEADER-->
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN PAGE TITLE & BREADCRUMB-->
				<h3 class="page-title">
					文件容量统计<small>统计文件夹下的文件总容量</small>
				</h3>
				<ul class="page-breadcrumb breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="{:url('index/index/index')}">
							Home
						</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="{:url('index/count/index')}">
							文件容量统计
						</a>
						<i class="fa fa-angle-right"></i>
					</li>
				</ul>
				<!-- END PAGE TITLE & BREADCRUMB-->
			</div>
		</div>

		<!-- END PAGE HEADER-->
		<!-- BEGIN PAGE CONTENT-->
		<div class="row">
			<div class="col-md-12">
				<!-- Begin: life time stats -->
				<div class="portlet">
					<div class="portlet-title">
						<div class="caption">
							<i class="fa fa-gift"></i>报表中心
						</div>
						<div>
							<span class="glyphicon glyphicon-edit" style="font-size: 15px;cursor: pointer;margin-left: 10px;"></span>
						</div>
						<!--<div class="actions">
							<div class="btn-group">
								<a class="btn blue yellow-stripe" href="#" data-toggle="dropdown">
									<i class="glyphicon glyphicon-plus"></i> 新建
								</a>

							</div>
						</div>-->
					</div>
					<div class="portlet-body">
						<div class="table-container">
							<div class="table-actions-wrapper">
									<span>
									</span>
								<select class="table-group-action-input form-control input-inline input-small input-sm">
									<option value="">Select...</option>
									<option value="publish">Publish</option>
									<option value="unpublished">Un-publish</option>
									<option value="delete">Delete</option>
								</select>
								<button class="btn btn-sm yellow table-group-action-submit"><i class="fa fa-check"></i> Submit</button>
							</div>
						</div>
					</div>
					<!-- End: life time stats -->
				</div>
				<div class="col-md-3" style="background-color: #f6f8fa;height: 100%">
					<ul style="margin-top: 10px;margin-bottom: 10px;">
						<li style="color: #777777;margin-bottom: 10px;"><a href="{:url('index/Count/index')}"><i class="fa fa-bar-chart-o"></i>  文件数量统计</a></li>
						<li style="color: #777777;margin-bottom: 10px;"><a href="{:url('index/Count/rongl')}"><i class="fa fa-bar-chart-o"></i>  文件容量统计</a></li>
						<li style="color: #777777;margin-bottom: 10px;"><a href="{:url('index/Count/index')}"><i class="fa fa-bar-chart-o"></i>  文件夹信息统计表</a></li>
						<li style="color: #777777;margin-bottom: 10px;"><a href="{:url('index/Count/index')}"><i class="fa fa-bar-chart-o"></i>  纸质借出文档报表</a></li>
						<li style="color: #777777;margin-bottom: 10px;"><a href="{:url('index/Count/index')}"><i class="fa fa-bar-chart-o"></i>  文档贡献统计</a></li>
					</ul>
				</div>
				<div class="col-md-9">
					<h2>文件容量统计</h2>
					<h4>统计文件夹下的文件总容量</h4>
					<div style="margin-bottom: 20px">
						<tbody>
						 <tr>
							 <th>位置<i class="fa fa-angle-right"></i></th>
							 <div><a href="#" class="path" data-id="{$cate_id}" data-type="{$cate_type}"><i class="fa fa-folder" style="color:#FFB74D;"></i> {$show_path}</a></div>
						 </tr>
						 <td>
							<button class="btn getmodal" href="{:url('index/Count/addFile')}">选择</button>
						 </td>
						</tbody>
					</div>
					<div>
						<button class="btn blue tongji" style="margin-bottom: 10px">统计</button>
						<div id="main" style="height:400px"></div>
					</div>
				</div>
			</div>

			<!-- END PAGE CONTENT-->
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="footer">
	<div class="footer-inner">
		2014 &copy; Metronic by keenthemes.
	</div>
	<div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
	</div>
</div>
<script src="/static/assets/plugins/jstree/dist/jstree.min.js"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script src="/static/assets/scripts/custom/ui-tree.js"></script>
<script src="/static/assets/scripts/core/app.js"></script>

<link rel="stylesheet" type="text/css" href="/static/assets/plugins/jstree/dist/themes/default/style.min.css"/>
<script src="/static/assets/scripts/core/dt.js"></script>
<script src="/static/assets/echarts/build/dist/echarts-all.js"></script>

</body>
<script>
	dt().getModals();
    $('.path').click(function () {
        var id = $(this).attr('data-id');
        var type = $(this).attr('data-type');
        var url;
        if(type == 1){
			url = '{:url(\'index/Prearc/setCateId\')}';
            url1 = '{:url(\'index/Prearc/index\')}';
		}else if(type ==2){
            url = '{:url(\'index/Arc/setCateId\')}';
            url1 = '{:url(\'index/Arc/index\')}';
		}else{
            url = '{:url(\'index/Compilation/setCateId\')}';
            url1 = '{:url(\'index/Compilation/index\')}';
		}
        $.ajax({
            url:url,
            data:{cate_id:id},
            type:'post',
            dataType:'json',
            success:function (e) {
                if(e.code == 1) {
                    window.location.href = url1;
                }
            }
        });
        return false;
    });
    $('.tongji').click(function () {
		$.ajax({
			url:'{:url(\'index/Count/getFileRongl\')}',
			type:'POST',
			dataType:'json',
			success:function (e) {
				if(e.code == 1){
					// 基于准备好的dom，初始化echarts图表
                    var myChart = echarts.init(document.getElementById('main'));
                    var option = {
                        tooltip: {
                            show: true
                        },
                        xAxis : [
                            {
                                type : 'category',
                                data : e.data.cdata
                            }
                        ],
                        yAxis : [
                            {
                                type : 'value'
                            }
                        ],
                        series : [
                            {
                                "name":"销量",
                                "type":"bar",
                                "data":e.data.cnum
                            }
                        ]
                    };
                    // 为echarts对象加载数据
                    myChart.setOption(option);
				}
            }
		});
    });


</script>
</html>
{/block}
